package com.dreamer.service.mobile;

import com.dreamer.domain.pmall.goods.PmallGoods;
import com.dreamer.domain.pmall.goods.PmallGoodsStockBlotter;
import com.dreamer.domain.sub.SubGoods;
import com.dreamer.domain.user.Admin;
import ps.mx.otter.utils.SearchParameter;

import java.util.List;

/**
 * Created by huangfei on 12/07/2017.
 */
public interface SubGoodsHandler extends  BaseHandler<SubGoods>{

    List<SubGoods> findMallGoods(SearchParameter<SubGoods> p);

    List<SubGoods> findMallGoods_zh(SearchParameter<SubGoods> p);

    List<SubGoods> findMallGoodss_zh();

    void  deductMallGoodsAccount(SubGoods pmallGoods, Integer qunatity);

    void  increaseMallGoodsAccount(SubGoods pmallGoods, Integer qunatity);

    PmallGoodsStockBlotter changeStock(Admin admin, SubGoods pmallGoods, Integer quantity, String remark);

    List<PmallGoods> findSubGoodsByUserId(Integer userId);

    SubGoods saveOrUpdate(SubGoods subGoods);

}
